'''
线程
'''

from threading import Thread


def func1(film):
    print('download film-1' + film)


t1 = Thread(target=func1, args=('电影1',))
t2 = Thread(target=func1, args=('电影2',))
t3 = Thread(target=func1, args=('电影3',))
t1.start()
t2.start()
t1.join()
t2.join()


class Download(Thread):
    def __init__(self, film):
        super().__init__()
        self.film = film

    # run方法是子线程自动调用的方法，除了self参数以外不能有其他参数
    def run(self) -> None:
        print('下载电影')


t1 = Download('电影')
